#ifndef __LCD_H
#define __LCD_H

#include "main.h"



#define LTDC_WIDTH  480
#define LTDC_HEIGHT 800
#define LAYER0_ADDR (uint32_t)(&ltdc_layer0)
#define LCD_LED(n)     (n?HAL_GPIO_WritePin(LCD_BCK_GPIO_Port,LCD_BCK_Pin,GPIO_PIN_SET):HAL_GPIO_WritePin(LCD_BCK_GPIO_Port,LCD_BCK_Pin,GPIO_PIN_RESET))

extern uint16_t ltdc_layer0[LTDC_WIDTH][LTDC_HEIGHT];

#define DEFAULT_COLOR 0x4193D0

uint32_t LCD_ReadPoint(uint16_t x, uint16_t y);
void LCD_DrawPoint(uint16_t x, uint16_t y, uint32_t color);
void LCD_COLOR_Fill(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint16_t color);
void LCD_Fill(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint16_t* color);


#endif



